package demo1;

public class Test {

    public static void main(String[] args)
            throws CloneNotSupportedException {
        Person person = new Person("zhangsan");

        Person person2 = (Person) person.clone();

        System.out.println("拷贝前");
        /*System.out.println(person.money.money);
        System.out.println(person2.money.money);*/
        System.out.println(person.money);
        System.out.println(person2.money);
        person2.money.money = 19;
        System.out.println("拷贝后");
        System.out.println(person);
        System.out.println(person2);
    }
}
